class MyError(Exception):
    pass

def say_hello(str):
    if str != "hello":
        raise MyError("传入的字符串不是hello")
    print("hello")

say_hello("world")

